using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using QuanLyThuVien1.DTO;
using QuanLyThuVien1.DAO;

namespace QuanLyThuVien1.BUS
{
   public class CDocGia_Bus
    {
       public void ThemDocGia(DOCGIA d)
       {
           DOCGIA_DAO d1 = new DOCGIA_DAO();
           d1.themDG(d);
       }
       public void XoaDocGia(string maDG)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           d.xoaDG(maDG);
       }
       public DOCGIA TimDocGia_Bus(string maDG)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
         return  d.timDG(maDG);
       }
       public void CapNhatThongTinDocGia(DOCGIA d, string maDG)
       {
           DOCGIA_DAO d1 = new DOCGIA_DAO();
           d1.capNhat(d, maDG);
       }
       public string LayThongTinPassWord(string maDG)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           return d.LayPassCuaDG(maDG);
       }
       public DataTable LayDanhSachDocGia()
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           return d.LayDanhSachDG();
       }
       public DataTable LayThongTin1DocGia_Bus(string pass, string maDG)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           DataTable d1 = new DataTable();
           d1 =  d.LayThongTin1DocGia(pass,maDG);
           return d1;
       }
       public void CapNhatThongTinDG1(DOCGIA d, string maDG, string pass)
       {
           DOCGIA_DAO d1 = new DOCGIA_DAO();
           d1.CapNhatThongTinDG(d, maDG, pass);
       }
       public void CapNhatTienPhat(string maDG, int soTien)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           d.CapNhatTienPhat(maDG, soTien);
       }
       public bool KiemTraDG(string maDG)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
            return d.KiemTraDG(maDG);
       }
       public int TienPhat(string maDG)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           return d.tienPhat(maDG);
       }
       public string LayTenDG(string maDG)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           return d.LayTenDG(maDG);
       }
       public DataTable LayDanhSachDGNoTien()
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           return d.LayDanhSachDGNoTien();
       }
       public string TinhTongTienNo()
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           return d.TinhTongTienNo();
       }
       public DateTime LayNgayLamThe(string maDG)
       {
           DOCGIA_DAO d = new DOCGIA_DAO();
           return d.LayNgayLamThe(maDG);
       }
    }
}
